@mixin input-color($name, $border-color)
  &.has-#{$name}
    .form-control
      border-color: $border-color
      box-shadow: none

input, textarea
  &.form-control
    border-radius: 2px
    padding: 10px 15px
    height: auto
    font-size: 1em
    line-height: auto
    border: 1px solid $grey-darker
    background-color: transparent
    box-shadow: none
    margin-bottom: 15px
      
textarea
  &.form-control
    padding: 15px

input
  & ::-webkit-input-placeholder
    line-height: normal

.input-group
  border: 1px solid $grey-darker
  border-radius: 2px
  margin-bottom: 15px
  width: 100%
  .input-group-addon
    font-size: 1em
    width: auto
    border: 0
    background-color: transparent
    width: 40px
    text-align: center
  input, textarea
    &.form-control
      border: 0

  .input-group-addon + .form-control
    border-left: 1px solid $grey

.form-horizontal
  .control-label
    font-weight: 400
    font-size: 1em
    text-align: left
  .control-label-help
    color: $grey-darkest
    font-size: 0.9em
  .form-group
    .help-block
      font-weight: 300
      font-size: 0.9em

.form-group
  margin-bottom: 0

@include input-color("success", $green-darker)
@include input-color("warning", $yellow-darker)
@include input-color("error", $red)

.select2-dropdown
  border: 1px solid #DDD
  box-shadow: 0 1px 2px rgba(0,0,0,0.1)
  border-bottom-right-radius: 2px
  border-bottom-left-radius: 2px

  .select2-results__option[aria-selected=true]
    background-color: #F9F9F9

  .select2-results__option__highlighted[aria-selected]
    background-color: #095077
    color: $white

@import './checkbox'
@import './select'